﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Functions/Announcement/Announcement.master" AutoEventWireup="true" CodeBehind="Main.aspx.cs" Inherits="HRDexCapstoneProject.Functions.Announcement.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainPage" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="AnnouncementID" DataSourceID="AnnouncementBullitin">
        <Columns>
            <asp:BoundField DataField="AnnouncementID" HeaderText="AnnouncementID" 
                InsertVisible="False" ReadOnly="True" SortExpression="AnnouncementID" 
                Visible="False" />
            <asp:BoundField DataField="Subject" HeaderText="Subject" 
                SortExpression="Subject" />
            <asp:BoundField DataField="Body" HeaderText="Body" SortExpression="Body" />
            <asp:BoundField DataField="DateTime" HeaderText="DateTime" 
                SortExpression="DateTime" />
            <asp:BoundField DataField="EmployeesID" HeaderText="EmployeesID" 
                SortExpression="EmployeesID" />
            <asp:BoundField DataField="CatAnnID" HeaderText="CatAnnID" 
                SortExpression="CatAnnID" />
         <asp:TemplateField HeaderText="View Details"> 
<ItemTemplate> 
    <asp:HyperLink ID="lnkSelect" runat='server' NavigateUrl='<%# String.Format("~/Functions/Announcement/AddEditView.aspx?AnnouncementID={0}", Eval("AnnouncementID")) %>'>Select</asp:HyperLink> 
</ItemTemplate> 
</asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="AnnouncementBullitin" runat="server" 
        ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
        SelectCommand="SELECT * FROM [formAnnouncement]"></asp:SqlDataSource>
</asp:Content>
